package drinkshop;

/**
 * @Auther: fei
 * @Date: 2021/6/5 - 06 - 05 - 22:26
 * @Description: drinkshop
 * @version: 1.0
 */
public class Drink {
    //属性
    String name;
    double price;
    String size;
    String remark;
    String isIce;
    int num;

    //方法


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getIce() {
        return isIce;
    }

    public void setIce(String ice) {
        isIce = ice;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    //展示饮品信息
    public String showDrink(){
        return "饮料名字是："+name+"\n价格为："+price+"\n规格为："
                +size+isIce+"\n购买数量为："+num+"\n备注："+remark;
    }

//    public void display(){
//        System.out.print("这是 "+name+"饮料，价格："+price+"，规格为："
//        +size+"，购买数量为："+num+"，备注："+remark);
//        if(isIce){
//            System.out.println("，需要加冰。");
//        }else{
//            System.out.println("，不需要加冰。");
//        }
//    }

    //构造器
    public Drink(){

    }

    public Drink(String name, double price, String size, String remark, String isIce, int num) {
        this.name = name;
        this.price = price;
        this.size = size;
        this.remark = remark;
        this.isIce = isIce;
        this.num = num;
    }
}
